package main

import (
	"fmt"
	"runtime"
)

func main() {
	runtime.GOMAXPROCS(runtime.NumCPU())
	runtime.GOMAXPROCS(1)
	c := make(chan int)
	go func() {
		for i := 0; i < 10; i++ {
			//time.Sleep(1 * time.Second)
			fmt.Println("go go go!!!")
			fmt.Println(<-c)
		}

		//c <- true
	}()
	fmt.Println("EFEFEF")
	for i := 0; i < 10; i++ {
		c <- i
	}
	fmt.Println("OK")
	//time.Sleep(10 * time.Second)

}
